/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface YfShRecord extends BasicModel<YfShRecord> {
  preId?: string; // 预约ID
  routeCode?: string; // 线路编号
  hospCode?: string; // 医院编号
  hospName?: string; // 医疗机构
  driverName?: string; // 驾驶员
  driver2Name?: string; // 押运员
  overDate?: string; // 确认收运时间
  overBy?: string; // 确认人
  shStatus?: string; // 收运状态
  qtyGr?: number; // 感染箱数
  qtyPs?: number; // 破损箱数
  qtySum?: number; // 总箱数
  weightGr?: number; // 感染重量
  weightPs?: number; // 破损重量
  weightSum?: number; // 总重量
  csource?: string; // 来源
  extId?: string; // 外部ID
}

export const yfShRecordList = (params?: YfShRecord | any) =>
  defHttp.get<YfShRecord>({ url: adminPath + '/bus/sh/yfShRecord/list', params });

export const yfShRecordListData = (params?: YfShRecord | any) =>
  defHttp.post<Page<YfShRecord>>({ url: adminPath + '/bus/sh/yfShRecord/listData', params });

export const yfShRecordForm = (params?: YfShRecord | any) =>
  defHttp.get<YfShRecord>({ url: adminPath + '/bus/sh/yfShRecord/form', params });

export const yfShRecordSave = (params?: any, data?: YfShRecord | any) =>
  defHttp.postJson<YfShRecord>({ url: adminPath + '/bus/sh/yfShRecord/save', params, data });

export const yfShRecordDelete = (params?: YfShRecord | any) =>
  defHttp.get<YfShRecord>({ url: adminPath + '/bus/sh/yfShRecord/delete', params });
